{% extends 'baseBlog.html' %}
{% load static %}




{% block naviePark %}

    {#{% include 'component-naviePark8/c_lunbo.html' %}#}

{% endblock %} {# 上 #}


{% block content %}
    <div class="alert alert-primary" role="alert">
        {{ STATE }} {{ WarningWord }}
    </div>
    <div class="container">
        <div class="row">
            <div class="col-12">
                <br>
                <!-- 提交文章的表单 -->
                <form method="post" action="{% url 'editorPost' %}">
                    <!--Django中需要POST数据的地方都必须有csrf_token -->
                    {% csrf_token %}
                    <!-- 文章标题 -->
                    <div class="form-group">
                        <!-- 标签 -->
                        <label for="title">文章标题</label>
                        <!-- 文本框 -->
                        <input type="text" class="form-control" id="title" name="title">
                    </div>
                    <!-- 文章正文 -->
                    <div class="form-group">
                        <label for="body">文章正文</label>
                        <!-- 文本区域 -->
                        <textarea type="text" class="form-control" name="body" id="body" rows="12"></textarea>
                    </div>

                    <div class="row">
                        <div class="col">
                            <!-- 发文时间 -->
                            <div class="form-group">
                                <label for="body">发布时间</label>
                                <!-- 文本区域 -->
                                <input type="datetime-local" class="form-control" name="datetimepicker" id="postTime">
                            </div>
                        </div>
                        <div class="col">
                            <!-- 阅读人数 -->
                            <div class="form-group">
                                <label for="body">文章阅读人数</label>
                                <!-- 文本区域 -->
                                <input type="number" class="form-control" name="readNum" id="readNum">
                            </div>
                        </div>
                        <div class="col">
                            <!-- 阅读人数 -->

                                <select class="custom-select" name="category">
                                {% for fenlei in category_typeQuerySet %}
                                    <option value="{{ fenlei.id }}">板块{{ fenlei.id }}-{{ fenlei.name }}</option>
                                {% endfor %}
                            </select>

                        </div>
                    </div>

                    <!-- 提交按钮 -->
                    <button type="submit" class="btn btn-primary">完成</button>
                </form>
            </div>
        </div>


    </div>



{% endblock %}  {# 中左8 #}


{# 中右 #}
{% block contentNavie %}
{#    {% include 'component-contentNavie4/c_JDInput.html' %}#}
{#    {% include 'component-contentNavie4/c_imagePlay.html' %}#}
{% endblock %} {# 中右 #}


{% block underContent %}{% endblock %}  {# 下 #}


<script type="text/javascript">
    var inputs = document.getElementById("input_nickname");
    var shows = document.getElementsByClassName("pddd");

    inputs.onkeyup = function () {
        var i;
        for (i = 0; i < shows.length; i++) {
            shows[i].innerHTML = inputs.value;
        }
    };

</script>










